import request from '@/utils/request'

/**
 * 工位信息分页查询
 * @param {查询条件} data
 */
export function pageFacStation(query) {
	return request({
		url: 'FacManage/FacStation/pageList',
		method: 'get',
		params: query,
	})
}

/**
 * 工位管理树查询
 */
export function treeFacStation(query) {
	return request({
		url: 'FacManage/FacStation/treeList',
		method: 'get',
		params: query,
	})
}

/**
 * 新增工位信息
 * @param data
 */
export function addFacStation(data) {
	return request({
		url: 'FacManage/FacStation',
		method: 'post',
		data: data,
	})
}
/**
 * 修改工位信息
 * @param data
 */
export function updateFacStation(data) {
	return request({
		url: 'FacManage/FacStation',
		method: 'PUT',
		data: data,
	})
}
/**
 * 获取工位信息详情
 * @param {Id}
 */
export function getFacStation(id) {
	return request({
		url: 'FacManage/FacStation/' + id,
		method: 'get'
	})
}

/**
 * 删除工位信息
 * @param {主键} pid
 */
export function delFacStation(pid) {
	return request({
		url: 'FacManage/FacStation/delete',
		method: 'POST',
		data: pid
	})
}
